<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>跳动爱心</title>
    <style>
        .container{
            display: flex;
            justify-self: center;
            align-items: center;
            padding-left: 27%;
            padding-top: 10%;
        }
        .heart{
            /* background: green; */
            height: 600px;   
            width: 600px;
            position: relative;
            transform: rotate(45deg);
        }
        .heart div{
            background: pink;
            position: absolute;
            height: 200px;   
            width: 200px;
            top: 50%;
            left: 50%;
            transform: translate(-50%,-50%);
            /* 加动画 */
            animation: head-jump 1.2s ease-in-out infinite;
        }
        @keyframes head-jump {
            0%{
                transform: scale(0.95);
            }
            40%{
                transform: scale(1);
            }
            100%{
                transform: scale(1.9);
            }
        }
        .heart div:before{
            content: '';
            display: block;
            width: 200px;
            height: 200px;
            background: orange;
            position: absolute;
            left: -120px;
            border-radius: 50% 0 0 50%;

        }
        .heart div:after{
            content: '';
            display: block;
            width: 200px;
            height: 200px;
            background: orange;
            position: absolute;
            top: -120px;
            border-radius: 50% 50% 0 0;
        }
    </style>
</head>

<body>
    <div class="container">
        <div class="heart">
            <div></div>
        </div>
    </div>
</body>

</html>